package com.sky.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 自定义定时任务类
 */

@Component

public class TaskDemo {
//    @Scheduled(cron="0/6 * * * * ? ")
//    public void myTask(){
//        System.out.println("定时任务执行了"+ LocalDateTime.now());
//    }
}
